\hypertarget{classduye_1_1_xml_attribute}{\section{duye\-:\-:Xml\-Attribute Class Reference}
\label{classduye_1_1_xml_attribute}\index{duye\-::\-Xml\-Attribute@{duye\-::\-Xml\-Attribute}}
}


An attribute is a name-\/value pair. Elements have an arbitrary number of attributes, each with a unique name.  




{\ttfamily \#include $<$duye\-\_\-xml.\-h$>$}

Inheritance diagram for duye\-:\-:Xml\-Attribute\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classduye_1_1_xml_attribute}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classduye_1_1_xml_attribute_a645b2a8f68050fe5f35ed394f9fe4c40}{\hyperlink{classduye_1_1_xml_attribute_a645b2a8f68050fe5f35ed394f9fe4c40}{Xml\-Attribute} ()}\label{classduye_1_1_xml_attribute_a645b2a8f68050fe5f35ed394f9fe4c40}

\begin{DoxyCompactList}\small\item\em Construct an empty attribute. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a827e3964407c01db26704353292fbb47}{\hyperlink{classduye_1_1_xml_attribute_a827e3964407c01db26704353292fbb47}{Xml\-Attribute} (const std\-::string \&\hyperlink{classduye_1_1_xml_attribute_ad6e55bfbedc8b2873b64234487e4a7f0}{name}, const std\-::string \&\hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value})}\label{classduye_1_1_xml_attribute_a827e3964407c01db26704353292fbb47}

\begin{DoxyCompactList}\small\item\em std\-::string constructor. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a19e6085dd37e85422f6c8f0de44f77dd}{\hyperlink{classduye_1_1_xml_attribute_a19e6085dd37e85422f6c8f0de44f77dd}{Xml\-Attribute} (const char $\ast$\hyperlink{classduye_1_1_xml_attribute_ad6e55bfbedc8b2873b64234487e4a7f0}{name}, const char $\ast$\hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value})}\label{classduye_1_1_xml_attribute_a19e6085dd37e85422f6c8f0de44f77dd}

\begin{DoxyCompactList}\small\item\em Construct an attribute with a name and value. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_ad6e55bfbedc8b2873b64234487e4a7f0}{const char $\ast$ \hyperlink{classduye_1_1_xml_attribute_ad6e55bfbedc8b2873b64234487e4a7f0}{name} () const }\label{classduye_1_1_xml_attribute_ad6e55bfbedc8b2873b64234487e4a7f0}

\begin{DoxyCompactList}\small\item\em Return the name of this attribute. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{const char $\ast$ \hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value} () const }\label{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}

\begin{DoxyCompactList}\small\item\em Return the value of this attribute. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a5f886316ad3cf473612bb968e41d7dcb}{const std\-::string \& \hyperlink{classduye_1_1_xml_attribute_a5f886316ad3cf473612bb968e41d7dcb}{value\-Str} () const }\label{classduye_1_1_xml_attribute_a5f886316ad3cf473612bb968e41d7dcb}

\begin{DoxyCompactList}\small\item\em Return the value of this attribute. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_ab13136fe75ad796dc1938c8c272a71fd}{int \hyperlink{classduye_1_1_xml_attribute_ab13136fe75ad796dc1938c8c272a71fd}{int\-Value} () const }\label{classduye_1_1_xml_attribute_ab13136fe75ad796dc1938c8c272a71fd}

\begin{DoxyCompactList}\small\item\em Return the value of this attribute, converted to an integer. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a131a0c2265be6cf3248c1862d449cbf4}{double \hyperlink{classduye_1_1_xml_attribute_a131a0c2265be6cf3248c1862d449cbf4}{double\-Value} () const }\label{classduye_1_1_xml_attribute_a131a0c2265be6cf3248c1862d449cbf4}

\begin{DoxyCompactList}\small\item\em Return the value of this attribute, converted to a double. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a01dc3605ede2521a50975015c7a6ebf0}{const std\-::string \& {\bfseries name\-T\-Str} () const }\label{classduye_1_1_xml_attribute_a01dc3605ede2521a50975015c7a6ebf0}

\item 
int \hyperlink{classduye_1_1_xml_attribute_af8dd3516e3902d8123dbdbc07dc24a4c}{query\-Int\-Value} (int $\ast$\hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value}) const 
\begin{DoxyCompactList}\small\item\em Query\-Int\-Value examines the value string. It is an alternative to the Int\-Value() method with richer error checking. If the value is an integer, it is stored in 'value' and the call returns X\-M\-L\-\_\-\-S\-U\-C\-C\-E\-S\-S. If it is not an integer, it returns X\-M\-L\-\_\-\-W\-R\-O\-N\-G\-\_\-\-T\-Y\-P\-E. \end{DoxyCompactList}\item 
int \hyperlink{classduye_1_1_xml_attribute_a024755920731632bf16340cccaeddb5f}{query\-Double\-Value} (double $\ast$\hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value}) const 
\begin{DoxyCompactList}\small\item\em Query\-Double\-Value examines the value string. See Query\-Int\-Value(). \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a5f9f227d40aa8564fd1650ecf488ae15}{void \hyperlink{classduye_1_1_xml_attribute_a5f9f227d40aa8564fd1650ecf488ae15}{set\-Name} (const char $\ast$\hyperlink{classduye_1_1_xml_attribute_ad6e55bfbedc8b2873b64234487e4a7f0}{name})}\label{classduye_1_1_xml_attribute_a5f9f227d40aa8564fd1650ecf488ae15}

\begin{DoxyCompactList}\small\item\em Set the value. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_ad6c152c98909294266b9ec2cc04a4ab6}{void \hyperlink{classduye_1_1_xml_attribute_ad6c152c98909294266b9ec2cc04a4ab6}{set\-Value} (const char $\ast$\hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value})}\label{classduye_1_1_xml_attribute_ad6c152c98909294266b9ec2cc04a4ab6}

\begin{DoxyCompactList}\small\item\em Set the value from an integer. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a955d4d213842a47b11def26478b6581b}{void \hyperlink{classduye_1_1_xml_attribute_a955d4d213842a47b11def26478b6581b}{set\-Int\-Value} (int \hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value})}\label{classduye_1_1_xml_attribute_a955d4d213842a47b11def26478b6581b}

\begin{DoxyCompactList}\small\item\em Set the value from a double. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_ad81aae561552c8540f899aa7c4ada189}{void {\bfseries set\-Double\-Value} (double \hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value})}\label{classduye_1_1_xml_attribute_ad81aae561552c8540f899aa7c4ada189}

\item 
\hypertarget{classduye_1_1_xml_attribute_a5b946b50f95cfe94dbbd8c52f068c8a6}{void \hyperlink{classduye_1_1_xml_attribute_a5b946b50f95cfe94dbbd8c52f068c8a6}{set\-Name} (const std\-::string \&\hyperlink{classduye_1_1_xml_attribute_ad6e55bfbedc8b2873b64234487e4a7f0}{name})}\label{classduye_1_1_xml_attribute_a5b946b50f95cfe94dbbd8c52f068c8a6}

\begin{DoxyCompactList}\small\item\em S\-T\-L std\-::string form. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_ab06e2af946a87980575b48ab0bf4b991}{void \hyperlink{classduye_1_1_xml_attribute_ab06e2af946a87980575b48ab0bf4b991}{set\-Value} (const std\-::string \&\hyperlink{classduye_1_1_xml_attribute_aabc7f194b334216373680bb4f9509f01}{value})}\label{classduye_1_1_xml_attribute_ab06e2af946a87980575b48ab0bf4b991}

\begin{DoxyCompactList}\small\item\em S\-T\-L std\-::string form. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_ac83983c2ce9deabc14acadd3adbf7c83}{const \hyperlink{classduye_1_1_xml_attribute}{Xml\-Attribute} $\ast$ \hyperlink{classduye_1_1_xml_attribute_ac83983c2ce9deabc14acadd3adbf7c83}{next} () const }\label{classduye_1_1_xml_attribute_ac83983c2ce9deabc14acadd3adbf7c83}

\begin{DoxyCompactList}\small\item\em Get the next sibling attribute in the D\-O\-M. Returns null at end. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a52aca125429a249c5da2e132bdd4f18a}{\hyperlink{classduye_1_1_xml_attribute}{Xml\-Attribute} $\ast$ {\bfseries next} ()}\label{classduye_1_1_xml_attribute_a52aca125429a249c5da2e132bdd4f18a}

\item 
\hypertarget{classduye_1_1_xml_attribute_ad77cdb559dbd699030423e730141c81e}{const \hyperlink{classduye_1_1_xml_attribute}{Xml\-Attribute} $\ast$ \hyperlink{classduye_1_1_xml_attribute_ad77cdb559dbd699030423e730141c81e}{previous} () const }\label{classduye_1_1_xml_attribute_ad77cdb559dbd699030423e730141c81e}

\begin{DoxyCompactList}\small\item\em Get the previous sibling attribute in the D\-O\-M. Returns null at beginning. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_a24dbc26328b973940388422cdd59c1e5}{\hyperlink{classduye_1_1_xml_attribute}{Xml\-Attribute} $\ast$ {\bfseries previous} ()}\label{classduye_1_1_xml_attribute_a24dbc26328b973940388422cdd59c1e5}

\item 
\hypertarget{classduye_1_1_xml_attribute_a46189973753d0235c35d7d0b9bf6c207}{bool {\bfseries operator==} (const \hyperlink{classduye_1_1_xml_attribute}{Xml\-Attribute} \&rhs) const }\label{classduye_1_1_xml_attribute_a46189973753d0235c35d7d0b9bf6c207}

\item 
\hypertarget{classduye_1_1_xml_attribute_a3bbd53f762d11584789ecf1243dbd1f0}{bool {\bfseries operator$<$} (const \hyperlink{classduye_1_1_xml_attribute}{Xml\-Attribute} \&rhs) const }\label{classduye_1_1_xml_attribute_a3bbd53f762d11584789ecf1243dbd1f0}

\item 
\hypertarget{classduye_1_1_xml_attribute_a3ab30cec3a4b8c9fe51f09087b844b5b}{bool {\bfseries operator$>$} (const \hyperlink{classduye_1_1_xml_attribute}{Xml\-Attribute} \&rhs) const }\label{classduye_1_1_xml_attribute_a3ab30cec3a4b8c9fe51f09087b844b5b}

\item 
\hypertarget{classduye_1_1_xml_attribute_a2c4cf719a7d4529d46d84fa1cf44a8cb}{virtual const char $\ast$ \hyperlink{classduye_1_1_xml_attribute_a2c4cf719a7d4529d46d84fa1cf44a8cb}{parse} (const char $\ast$p, Xml\-Parsing\-Data $\ast$data, Xml\-Encoding encoding)}\label{classduye_1_1_xml_attribute_a2c4cf719a7d4529d46d84fa1cf44a8cb}

\begin{DoxyCompactList}\small\item\em Attribute parsing starts\-: first letter of the name returns\-: the next char after the value end quote. \end{DoxyCompactList}\item 
virtual void \hyperlink{classduye_1_1_xml_attribute_a76fde61930196859780ba4e63c4f57ef}{print} (F\-I\-L\-E $\ast$cfile, int depth) const 
\begin{DoxyCompactList}\small\item\em All Gny\-Xml classes can print themselves to a filestream or the string class (G\-Xml\-String in non-\/\-S\-T\-L mode, std\-::string in S\-T\-L mode.) Either or both cfile and str can be null. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_attribute_af01be6af081342cc78ae5d92a06f5c75}{void {\bfseries print} (F\-I\-L\-E $\ast$cfile, int depth, std\-::string $\ast$str) const }\label{classduye_1_1_xml_attribute_af01be6af081342cc78ae5d92a06f5c75}

\item 
\hypertarget{classduye_1_1_xml_attribute_af453aa3a5b8c5311d9cfef3265919ac7}{void {\bfseries xml\-To\-Str} (std\-::string \&out\-Xml, int depth) const }\label{classduye_1_1_xml_attribute_af453aa3a5b8c5311d9cfef3265919ac7}

\item 
\hypertarget{classduye_1_1_xml_attribute_aa019719664bbfa338f7e035d683be338}{void {\bfseries set\-Document} (\hyperlink{classduye_1_1_xml_document}{Xml\-Document} $\ast$doc)}\label{classduye_1_1_xml_attribute_aa019719664bbfa338f7e035d683be338}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classduye_1_1_xml_attribute_abab4259f5631c2c673b78d780a1eaa88}{class {\bfseries Xml\-Attribute\-Set}}\label{classduye_1_1_xml_attribute_abab4259f5631c2c673b78d780a1eaa88}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
An attribute is a name-\/value pair. Elements have an arbitrary number of attributes, each with a unique name. 

\begin{DoxyNote}{Note}
The attributes are not Xml\-Nodes, since they are not part of the tiny\-X\-M\-L document object model. There are other suggested ways to look at this problem. 
\end{DoxyNote}


\subsection{Member Function Documentation}
\hypertarget{classduye_1_1_xml_attribute_a76fde61930196859780ba4e63c4f57ef}{\index{duye\-::\-Xml\-Attribute@{duye\-::\-Xml\-Attribute}!print@{print}}
\index{print@{print}!duye::XmlAttribute@{duye\-::\-Xml\-Attribute}}
\subsubsection[{print}]{\setlength{\rightskip}{0pt plus 5cm}virtual void duye\-::\-Xml\-Attribute\-::print (
\begin{DoxyParamCaption}
\item[{F\-I\-L\-E $\ast$}]{cfile, }
\item[{int}]{depth}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{classduye_1_1_xml_attribute_a76fde61930196859780ba4e63c4f57ef}


All Gny\-Xml classes can print themselves to a filestream or the string class (G\-Xml\-String in non-\/\-S\-T\-L mode, std\-::string in S\-T\-L mode.) Either or both cfile and str can be null. 

This is a formatted print, and will insert tabs and newlines.

(For an unformatted stream, use the $<$$<$ operator.) 

Implements \hyperlink{classduye_1_1_xml_base_aeb28d8aeec84aad3ce290c6cc3a5ec06}{duye\-::\-Xml\-Base}.

\hypertarget{classduye_1_1_xml_attribute_a024755920731632bf16340cccaeddb5f}{\index{duye\-::\-Xml\-Attribute@{duye\-::\-Xml\-Attribute}!query\-Double\-Value@{query\-Double\-Value}}
\index{query\-Double\-Value@{query\-Double\-Value}!duye::XmlAttribute@{duye\-::\-Xml\-Attribute}}
\subsubsection[{query\-Double\-Value}]{\setlength{\rightskip}{0pt plus 5cm}int duye\-::\-Xml\-Attribute\-::query\-Double\-Value (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{value}
\end{DoxyParamCaption}
) const}}\label{classduye_1_1_xml_attribute_a024755920731632bf16340cccaeddb5f}


Query\-Double\-Value examines the value string. See Query\-Int\-Value(). 

Set the name of this attribute. \hypertarget{classduye_1_1_xml_attribute_af8dd3516e3902d8123dbdbc07dc24a4c}{\index{duye\-::\-Xml\-Attribute@{duye\-::\-Xml\-Attribute}!query\-Int\-Value@{query\-Int\-Value}}
\index{query\-Int\-Value@{query\-Int\-Value}!duye::XmlAttribute@{duye\-::\-Xml\-Attribute}}
\subsubsection[{query\-Int\-Value}]{\setlength{\rightskip}{0pt plus 5cm}int duye\-::\-Xml\-Attribute\-::query\-Int\-Value (
\begin{DoxyParamCaption}
\item[{int $\ast$}]{value}
\end{DoxyParamCaption}
) const}}\label{classduye_1_1_xml_attribute_af8dd3516e3902d8123dbdbc07dc24a4c}


Query\-Int\-Value examines the value string. It is an alternative to the Int\-Value() method with richer error checking. If the value is an integer, it is stored in 'value' and the call returns X\-M\-L\-\_\-\-S\-U\-C\-C\-E\-S\-S. If it is not an integer, it returns X\-M\-L\-\_\-\-W\-R\-O\-N\-G\-\_\-\-T\-Y\-P\-E. 

A specialized but useful call. Note that for success it returns 0, which is the opposite of almost all other Gny\-Xml calls. 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Z\-:/duye/src/duyebase/utils/duye\-\_\-xml.\-h\end{DoxyCompactItemize}
